﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Pager.ascx.cs" Inherits="BigLotterySyndicate.Controls.Pager" %>
<div class="PagerContainer">
    <div class="Pager">
        <div class="PagerItemsRight">
	        <asp:PlaceHolder runat="server" id="LastPlaceHolder">
		        <div class="PagerItem PagerLast">
			        <asp:LinkButton runat="server" ID="LastLinkButton" OnCommand="Pager_Command" CommandName="LastSelect" CommandArgument="LastSelect"><%= this.PrintLastText() %></asp:LinkButton>
		        </div>
	        </asp:PlaceHolder>
	        <asp:PlaceHolder runat="server" id="LastPlaceHolderDisabled">
	            <div class="PagerItem PagerLast">
	                <span class="PagerDisabled"><%= this.PrintLastText() %></span>
	            </div>
	        </asp:PlaceHolder>		        
	        <asp:PlaceHolder runat="server" id="NextPlaceHolder">
		        <div class="PagerItem PagerNext">
			        <asp:LinkButton runat="server" ID="NextLinkButton" OnCommand="Pager_Command" CommandName="NextSelect" CommandArgument="NextSelect"><%= this.PrintNextText() %></asp:LinkButton>
		        </div>
	        </asp:PlaceHolder>
	        <asp:PlaceHolder runat="server" id="NextPlaceHolderDisabled">
	            <div class="PagerItem PagerNext">
	                <span class="PagerDisabled"><%= this.PrintNextText() %></span>
	            </div>
	        </asp:PlaceHolder>	        
        </div>    
        <div class="PagerItemsLeft">
	        <asp:PlaceHolder runat="server" id="FirstPlaceHolder">
		        <div class="PagerItem PagerFirst">
			        <asp:LinkButton runat="server" ID="FirstLinkButton" OnCommand="Pager_Command" CommandName="FirstSelect" CommandArgument="FirstSelect"><%= this.PrintFirstText() %></asp:LinkButton>
		        </div>
	        </asp:PlaceHolder>
	        <asp:PlaceHolder runat="server" id="FirstPlaceHolderDisabled">
	            <div class="PagerItem PagerFirst">
	                <span class="PagerDisabled"><%= this.PrintFirstText() %></span>
	            </div>
	        </asp:PlaceHolder>
	        <asp:PlaceHolder runat="server" id="PreviousPlaceHolder">
		        <div class="PagerItem PagerPrevious">
			        <asp:LinkButton runat="server" ID="PreviousLinkButton" OnCommand="Pager_Command" CommandName="PreviousSelect" CommandArgument="PreviousSelect"><%= this.PrintPreviousText() %></asp:LinkButton>
		        </div>
	        </asp:PlaceHolder>
	        <asp:PlaceHolder runat="server" id="PreviousPlaceHolderDisabled">
	            <div class="PagerItem PagerPrevious">
	                <span class="PagerDisabled"><%= this.PrintPreviousText() %></span>
	            </div>
	        </asp:PlaceHolder>	        
        </div>    
        <div class="PagerItemsCentre">
            <asp:PlaceHolder runat="server" id="PagesPlaceHolder">
		        <asp:Repeater runat="server" id="PagesRepeater" OnItemCommand="PagesRepeater_ItemCommand">
			        <ItemTemplate>
			            <span class="PagerItem <%# (int)Container.DataItem == this.PageIndex ? "PagerItemSelected" : "" %>"><asp:LinkButton ID="PagesLinkButton" runat="server" CommandName="PageSelect" CommandArgument="<%# this.PrintPageIndex(Container.DataItem) %>"><%# this.PrintPageIndex(Container.DataItem)%></asp:LinkButton></span>
			        </ItemTemplate>
		        </asp:Repeater>
	        </asp:PlaceHolder>
        </div>
    </div>
</div>